package com.lhz.config;


import lombok.Getter;

/**
 * token验证异常
 * Created by Vi
 * Date on 2019/4/17 11:07
 *
 * @author lihuazhi
 */
public class ServiceException extends RuntimeException {
    @Getter
    private Integer code;
    private String message;
    @Getter
    private String service;

    public ServiceException(int code, String message, String service) {
        this.code = code;
        this.message = message;
        this.service = service;
    }


    public ServiceException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public ServiceException(String message) {
        this.code = 500;
        this.message = message;
    }

    public ServiceException(String message, String service) {
        this.code = 500;
        this.message = message;
        this.service = service;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public void setService(String service) {
        this.service = service;
    }
}
